package org.example.inventory.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品类（对应商品表）
 */
public class Product extends BaseEntity{
    private String name;                    // 商品名称
    private BigDecimal price;               // 商品价格
    private Integer stock;                  // 商品库存
    private String description;             // 商品描述
    private LocalDateTime createTime;       // 创建时间
    private LocalDateTime lastRestockTime;  // 库存最后更新时间

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getLastRestockTime() {
        return lastRestockTime;
    }

    public void setLastRestockTime(LocalDateTime lastRestockTime) {
        this.lastRestockTime = lastRestockTime;
    }

    public Product() {
    }

    public Product(Integer id, String name, BigDecimal price, Integer stock, String description, LocalDateTime createTime, LocalDateTime lastRestockTime) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.stock = stock;
        this.description = description;
        this.createTime = createTime;
        this.lastRestockTime = lastRestockTime;
    }
}
